import javax.sound.midi.Soundbank;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

/**
 * @author BianWenKai
 * @DATE 2021/9/8 - 17:53
 **/

public class YangHuiTriangle {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[][] arr = printTriangle(scanner.nextInt());
        int length = arr.length;
        for (int i = 0; i < arr.length; i++) {
            for (int j = length; j > 0 ; j--) {
                System.out.print("  ");
            }
            for (int j = 0; j < arr[i].length; j++) {
                if (arr[i][j] == 0)
                    break;
                System.out.print(arr[i][j]+"   ");
            }
            System.out.println();
            length -- ;
        }
    }
    public static int[][]  printTriangle(int i) {
        int[][] array = new int[i][i];
        for (int j = 0; j < i; j++) {
            for (int k = 0; k <= j; k++) {
                if (k == 0||k == j)
                    array[j][k] = 1;
                else
                    array[j][k] = array[j-1][k-1]+array[j-1][k];
            }
        }
        return array;
    }
}